#pragma once
#include "explorer_window.h"
#include "afxcmn.h"
#include "afxwin.h"


// DlgEditLibrary dialog

class CDlgEditLibrary : public CDialog
{
	DECLARE_DYNAMIC(CDlgEditLibrary)

public:
	CDlgEditLibrary(CWnd* pParent = NULL);   // standard constructor
	virtual ~CDlgEditLibrary();

	virtual BOOL OnInitDialog();
	virtual void OnOK();
	virtual void OnCancel();

	afx_msg void OnBnClickedButtonApply();
	afx_msg void OnBnClickedButtonDelete();
	afx_msg void OnDeltaposSpinRecord(NMHDR *pNMHDR, LRESULT *pResult);

// Dialog Data
	enum { IDD = IDD_DIALOG_EDIT_LIBRARY };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()

public:
	BOOL m_bAddLibrary;
	LONG m_nID;
	LONG m_nOldID;
	CString m_szID;
	CString m_szDescription;
	CString m_szName;
	CString m_szEmail;
	CString m_szAddress;
	CString m_szPhone;
	CString m_szSubject;
	CString m_szInformation;

	CArray<LONG> m_naID;
	INT m_nIndexID;
	CSpinButtonCtrl m_ctrlRecord;
	BOOL m_bUserListed;
	BOOL m_bProblemLibrary;
	BOOL m_bInternalILLLibrary;
	BOOL m_bExternalILLLibrary;

	BOOL UpdateRecord();
	BOOL m_bDiverted;
};
